<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="js/echarts.js"></script>
	</head>
	<body>
		<script type="text/javascript">
function createRandomItemStyle() {    //随机颜色
    return {
        normal: {
            color: 'rgb(' + [
                Math.round(Math.random() * 160),
                Math.round(Math.random() * 160),
                Math.round(Math.random() * 160)
            ].join(',') + ')'
        }
    };
}
			require.config({
				paths:{
					echarts:'./js'
				}
			});
			require(
				 [	
                	'echarts',
                	'echarts/chart/line',
		            'echarts/chart/bar',
		            'echarts/chart/scatter',
		            'echarts/chart/k',
		            'echarts/chart/pie',
		            'echarts/chart/radar',
		            'echarts/chart/force',
		            'echarts/chart/chord',
		            'echarts/chart/gauge',
		            'echarts/chart/funnel',
		            'echarts/chart/eventRiver',
		            'echarts/chart/venn',
		            'echarts/chart/treemap',
		            'echarts/chart/tree',
		            'echarts/chart/wordCloud',
		            'echarts/chart/heatmap',
		            'echarts/chart/map'
                ],
             	function (ec){
             		 var myChart = ec.init(document.getElementById('main'));
             		var option = {
						    title: {
						        text: 'Google Trends',
						        link: 'http://www.google.com/trends/hottrends'
						    },
						    tooltip: {
						        show: true
						    },
						    series: [{
						        name: 'Google Trends',//鼠标悬浮，提示显示
						        type: 'wordCloud',
						        size: ['80%', '80%'],//宽度与高度设置
						        textRotation : [0, 45, 90, -45],
						        //textRotation:[0,30,60,90,120],//字符串随机倾斜角度
						        textPadding: 5, //字符串内边
						        autoSize: {
						            enable: true,
						             minSize: 40//最小字体大小
						        },
						       
						        data: null
						    }]
						};
                    
             			
             		
             		
             	myChart.setOption(option);	
             		
             	}
			);
		</script>
		<div id="main" style="height: 800px; border: 1px solid #CCCCCC; padding: 10px;"></div>
	</body>
</html>
